<template>
  <div class="all">
    <div class="header">
      <div class="img-box" @click.stop="$emit('showMe')">
        <img src="@/../public/images/1671779704879.png" alt="" />
      </div>
      <div class="text">设置</div>
    </div>
    <div class="content">
    <van-cell value="修改密码" @click="$toast('正在开发ing...')"/>
    </div>
    <div class="exit"><van-button type="danger" size="large" @click.stop="exitLoginHandler">退出登录</van-button></div>
  </div>
</template>

<script>
  export default {
    name:"SettingComponent",
    methods:{
      exitLoginHandler(){
        localStorage.setItem("token","");
        this.$store.commit("setInit");
        this.$router.push("/");
      }
    }
  }
</script>

<style lang="scss" scoped>
.all{
  width: 100%;
  height: 100vh;
  overflow: scroll;
  background-color: #fff;
  .header {
    position: relative;
    width: 100%;
    height: 1rem;
    background-color: #149639;
    background-image: url(@/../public/images/1671787342920.png);
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    padding: 0.3rem;
    .img-box {
      width: 0.15rem;
      height: 0.28rem;
      min-width: 0.15rem;
    }
    .text {
      flex-grow: 1;
      font-size: 0.36rem;
      font-weight: bold;
      color: #ffffff;
    }
  }
  .content{
    width: 100%;
    height: calc(100vh - 2rem);
    overflow: scroll;
  }
  .exit{
    position: sticky;
    width: 100%;
    height: 1rem;
    left: 0;
    bottom: 0;
  }
}
</style>